<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * 剧本类型（大类下的子类）
 */
class PlayType extends Model
{
    use SoftDeletes;

    protected $fillable = ['title', 'type'];
    
    public static function getTypeName($type)
    {
        $typeList = [
            0 => '未选择',
            1 => '用途',
            2 => '功能',
            3 => '风格',
        ];

        return isset($typeList[$type]) ? $typeList[$type] : '未知所属模块 - ' . $type;
    }
}
